

# RR means the proto need response from server. If not, it means the server got error.
class proto:
    def __init__(self):
        self.RR	= True
        self.inputs =  [];
        self.outputs = [];
        pass

    def work(self, connection):
        if self.RR:
            self.connection.send(self.input)
       	    self.connection.recv(self.output)
        else:
            self.connection.send(self.input)

    def err(self,num):
        print "proto error num:", self.errorno

